package cn.wecloud.im.multiplayervideodemo.utils

import android.content.Context
import com.bumptech.glide.GlideBuilder
import com.bumptech.glide.annotation.GlideModule
import com.bumptech.glide.load.engine.cache.DiskCache
import com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper
import com.bumptech.glide.module.AppGlideModule

@GlideModule
class GlideCache : AppGlideModule() {

    override fun applyOptions(context: Context, builder: GlideBuilder) {
        super.applyOptions(context, builder)
        builder.setDiskCache { DiskLruCacheWrapper.create(FolderUtil.getGlideFileDir(),DiskCache.Factory.DEFAULT_DISK_CACHE_SIZE*10.toLong()) }
    }

}